package com.gaofei.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户
 * @author 45466
 *
 */
public class HgUser implements  Serializable  {
	/*
	 * `uid` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(20) DEFAULT NULL,
	 * `password` varchar(60) DEFAULT NULL, `name` varchar(20) DEFAULT NULL, `email`
	 * varchar(30) DEFAULT NULL, `telephone` varchar(20) DEFAULT NULL, `birthday`
	 * date DEFAULT NULL, `sex` varchar(10) DEFAULT NULL, `state` int(11) DEFAULT
	 * NULL, `code` varchar(64) DEFAULT NULL,
	 */
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -8249803239593779790L;
	
	private Integer uid                    ;
	private String username               ;//用户登录使用的
	private String password               ;
	private String name                   ; //真实的姓名
	private String email                  ;
	private String telephone              ;
	
	private Date birthday               ;
	private int sex                    ;
//	private String state                  ;
	private String code                   ;  // 保存验证码
	public Integer getUid() {
		return uid;
	}
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public int getSex() {
		return sex;
	}
	public void setSex(int sex) {
		this.sex = sex;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Override
	public String toString() {
		return "HgUser [uid=" + uid + ", username=" + username + ", password=" + password + ", name=" + name
				+ ", email=" + email + ", telephone=" + telephone + ", birthday=" + birthday + ", sex=" + sex
				+ ", code=" + code + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((uid == null) ? 0 : uid.hashCode());
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		HgUser other = (HgUser) obj;
		if (uid == null) {
			if (other.uid != null)
				return false;
		} else if (!uid.equals(other.uid))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}
                                          

	
	
	
}
